﻿<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$"%>
<%@ Page Language="C#" CodeBehind="Post.aspx.cs" Inherits="SharePointPOBox.PostOffice.Post" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" x-undefined="" />
<title>SharePoint Post Office Box</title>
<style type="text/css">
body {
	margin: 0;
	padding: 0;
	background-color: #FFFFFF;
}
#title {
	margin: 50px auto 0;
	padding: 5px 0;
	width: 75%;
	border-top: solid 1px #CCCCCC;
	border-left: solid 1px #CCCCCC;
	border-right: solid 2px #BFBFBF;
	color: #FFFFFF;
	background-color: #666666;
	text-align: center;
	font-size: 120%;
	font-weight: bold;
}
#gradient1 {
	color: #FFFFFF;
	margin: 0 auto;
	height: 100px;
	width: 75%;
	border-top: solid 1px #CCCCCC;
	border-left: solid 1px #CCCCCC;
	border-right: solid 2px #BFBFBF;
	/* For WebKit (Safari, Google Chrome etc) */
	background: -webkit-gradient(linear, left top, left bottom, from(#E5E5E5), to(#FFFFFF));
	/* For Mozilla/Gecko (Firefox etc) */
	background: -moz-linear-gradient(top, #E5E5E5, #FFFFFF);
	/* For Internet Explorer 5.5 - 7 */
	filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#FFE5E5E5, endColorstr=#FFFFFFFF);
	/* For Internet Explorer 8 */
	-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#FFE5E5E5, endColorstr=#FFFFFFFF)";
}
#gradient2 {
	color: #E5E5E5;
	margin: 0 auto 50px;
	height: 100px;
	width: 75%;
	border-left: solid 1px #CCCCCC;
	border-right: solid 2px #BFBFBF;
	border-bottom: solid 2px #BFBFBF;
	/* For WebKit (Safari, Google Chrome etc) */
	background: -webkit-gradient(linear, left top, left bottom, from(#FFFFFF), to(#E5E5E5));
	/* For Mozilla/Gecko (Firefox etc) */
	background: -moz-linear-gradient(top, #FFFFFF, #E5E5E5);
	/* For Internet Explorer 5.5 - 7 */
	filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#FFFFFFFF, endColorstr=#FFE5E5E5);
	/* For Internet Explorer 8 */
	-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#FFFFFFFF, endColorstr=#FFE5E5E5)";
}
#dlTbl {
	margin: 0 auto;
	padding: 40px 0;
	width: 75%;
	border-left: solid 1px #CCCCCC;
	border-right: solid 2px #BFBFBF;
	background-color: #FFFFFF;
}
#dl {
	margin: 0 auto;
	padding: 0;
	width: 250px;
	border: none;
	border-collapse: collapse;
}
#dl th, #dl td {
	padding: 5px;
	border: none;
	border-collapse: collapse;
	white-space: nowrap;
}
#remainingNum {
	padding: 1em 0;
}
</style>
</head>

<body>
<script type="text/javascript">
    
    function reloader() {
        window.location.reload(true);
    }
</script>
<form id="form1" runat="server" onsubmit="window.onfocus = reloader;">
<div id="title">SharePoint Post Office Box</div>
<div id="gradient1">&nbsp;</div>
<div id="dlTbl">
<table id="dl">
	<tr>
		<th><div runat="server" id="lbFile">Upload file</div></th>
        <td>
            <input type="file" id="fileUpload" runat="server" />
		</td>
	</tr>
	<tr>
		<th><div runat="server" id="lbPassword">Password</div></th>
        <td>
            <input type="password" id="pwdPassword" runat="server" />
            <input type="submit" value="Upload" runat="server" id="btnUpload" />
		</td>
	</tr>
	<tr>
		<td></td>
		<td>
            <asp:CustomValidator runat="server"
                Display="Dynamic" ErrorMessage="Wrong password!" ID="PasswordValidator" />
            <asp:RequiredFieldValidator runat="server" ControlToValidate="pwdPassword"
                Display="Dynamic" ErrorMessage="Password is empty!" />
            <asp:RequiredFieldValidator runat="server" ControlToValidate="fileUpload"
                Display="Dynamic" ErrorMessage="File is empty!" />
			<asp:CustomValidator runat="server"
				Display = "Dynamic" ID="FileValidator" />
		</td>
	</tr>
	<tr>
		<td colspan="2" id="remainingNum"><label id="lbUploadingIsDone" runat="server"/></td>
	</tr>
</table>
</div>

<div id="gradient2">&nbsp;</div>

</form>
</body>

</html>
